3.200 \(\int \frac {\csc (c+d x)}{a+b \sec (c+d x)} \, dx\)

Optimal. Leaf size=74 \[ \frac {b \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )}+\frac {\log (1-\cos (c+d x))}{2 d (a+b)}-\frac {\log (\cos (c+d x)+1)}{2 d (a-b)} \]

[Out]

1/2*ln(1-cos(d*x+c))/(a+b)/d-1/2*ln(1+cos(d*x+c))/(a-b)/d+b*ln(b+a*cos(d*x+c))/(a^2-b^2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3872, 2721, 801} \[ \frac {b \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )}+\frac {\log (1-\cos (c+d x))}{2 d (a+b)}-\frac {\log (\cos (c+d x)+1)}{2 d (a-b)} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a + b*Sec[c + d*x]),x]

[Out]

Log[1 - Cos[c + d*x]]/(2*(a + b)*d) - Log[1 + Cos[c + d*x]]/(2*(a - b)*d) + (b*Log[b + a*Cos[c + d*x]])/((a^2
- b^2)*d)

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\csc (c+d x)}{a+b \sec (c+d x)} \, dx &=-\int \frac {\cot (c+d x)}{-b-a \cos (c+d x)} \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {x}{(-b+x) \left (a^2-x^2\right )} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {1}{2 (a-b) (a-x)}-\frac {b}{(a-b) (a+b) (b-x)}+\frac {1}{2 (a+b) (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {\log (1-\cos (c+d x))}{2 (a+b) d}-\frac {\log (1+\cos (c+d x))}{2 (a-b) d}+\frac {b \log (b+a \cos (c+d x))}{\left (a^2-b^2\right ) d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 63, normalized size = 0.85 \[ \frac {(a-b) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\left ((a+b) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )+b \log (a \cos (c+d x)+b)}{d (a-b) (a+b)} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a + b*Sec[c + d*x]),x]

[Out]

(-((a + b)*Log[Cos[(c + d*x)/2]]) + b*Log[b + a*Cos[c + d*x]] + (a - b)*Log[Sin[(c + d*x)/2]])/((a - b)*(a + b
)*d)

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 64, normalized size = 0.86 \[ \frac {2 \, b \log \left (a \cos \left (d x + c\right ) + b\right ) - {\left (a + b\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a - b\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, {\left (a^{2} - b^{2}\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(2*b*log(a*cos(d*x + c) + b) - (a + b)*log(1/2*cos(d*x + c) + 1/2) + (a - b)*log(-1/2*cos(d*x + c) + 1/2))
/((a^2 - b^2)*d)

________________________________________________________________________________________

giac [A]  time = 0.30, size = 100, normalized size = 1.35 \[ \frac {\frac {2 \, b \log \left ({\left | -a - b - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{2} - b^{2}} + \frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a + b}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

1/2*(2*b*log(abs(-a - b - a*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + b*(cos(d*x + c) - 1)/(cos(d*x + c) + 1)))/
(a^2 - b^2) + log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/(a + b))/d

________________________________________________________________________________________

maple [A]  time = 0.42, size = 75, normalized size = 1.01 \[ \frac {b \ln \left (b +a \cos \left (d x +c \right )\right )}{d \left (a -b \right ) \left (a +b \right )}+\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{d \left (2 a +2 b \right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{d \left (2 a -2 b \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a+b*sec(d*x+c)),x)

[Out]

1/d*b/(a-b)/(a+b)*ln(b+a*cos(d*x+c))+1/d/(2*a+2*b)*ln(-1+cos(d*x+c))-1/d/(2*a-2*b)*ln(1+cos(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.75, size = 64, normalized size = 0.86 \[ \frac {\frac {2 \, b \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{2} - b^{2}} - \frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a - b} + \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a + b}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

1/2*(2*b*log(a*cos(d*x + c) + b)/(a^2 - b^2) - log(cos(d*x + c) + 1)/(a - b) + log(cos(d*x + c) - 1)/(a + b))/
d

________________________________________________________________________________________

mupad [B]  time = 1.15, size = 68, normalized size = 0.92 \[ \frac {\ln \left (\cos \left (c+d\,x\right )-1\right )}{2\,d\,\left (a+b\right )}-\frac {\ln \left (\cos \left (c+d\,x\right )+1\right )}{2\,d\,\left (a-b\right )}+\frac {b\,\ln \left (b+a\,\cos \left (c+d\,x\right )\right )}{d\,\left (a^2-b^2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)*(a + b/cos(c + d*x))),x)

[Out]

log(cos(c + d*x) - 1)/(2*d*(a + b)) - log(cos(c + d*x) + 1)/(2*d*(a - b)) + (b*log(b + a*cos(c + d*x)))/(d*(a^
2 - b^2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc {\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+b*sec(d*x+c)),x)

[Out]

Integral(csc(c + d*x)/(a + b*sec(c + d*x)), x)

________________________________________________________________________________________